Optimal. Leaf size=123 \[ \frac{2 \sqrt{c+d} \tanh ^{-1}\left (\frac{\sqrt{a} \sqrt{d} \cos (e+f x)}{\sqrt{c+d} \sqrt{a \sin (e+f x)+a}}\right )}{a^{3/2} \sqrt{d} f (c-d)}-\frac{2 \sqrt{2} \tanh ^{-1}\left (\frac{\sqrt{a} \cos (e+f x)}{\sqrt{2} \sqrt{a \sin (e+f x)+a}}\right )}{a^{3/2} f (c-d)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.551369, antiderivative size = 123, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 35, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.171, Rules used = {2916, 2985, 2649, 206, 2773, 208} \[ \frac{2 \sqrt{c+d} \tanh ^{-1}\left (\frac{\sqrt{a} \sqrt{d} \cos (e+f x)}{\sqrt{c+d} \sqrt{a \sin (e+f x)+a}}\right )}{a^{3/2} \sqrt{d} f (c-d)}-\frac{2 \sqrt{2} \tanh ^{-1}\left (\frac{\sqrt{a} \cos (e+f x)}{\sqrt{2} \sqrt{a \sin (e+f x)+a}}\right )}{a^{3/2} f (c-d)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2916
Rule 2985
Rule 2649
Rule 206
Rule 2773
Rule 208
Rubi steps
\begin{align*} \int \frac{\cos ^2(e+f x)}{(a+a \sin (e+f x))^{3/2} (c+d \sin (e+f x))} \, dx &=\frac{\int \frac{a-a \sin (e+f x)}{\sqrt{a+a \sin (e+f x)} (c+d \sin (e+f x))} \, dx}{a^2}\\ &=\frac{2 \int \frac{1}{\sqrt{a+a \sin (e+f x)}} \, dx}{a (c-d)}-\frac{(c+d) \int \frac{\sqrt{a+a \sin (e+f x)}}{c+d \sin (e+f x)} \, dx}{a^2 (c-d)}\\ &=-\frac{4 \operatorname{Subst}\left (\int \frac{1}{2 a-x^2} \, dx,x,\frac{a \cos (e+f x)}{\sqrt{a+a \sin (e+f x)}}\right )}{a (c-d) f}+\frac{(2 (c+d)) \operatorname{Subst}\left (\int \frac{1}{a c+a d-d x^2} \, dx,x,\frac{a \cos (e+f x)}{\sqrt{a+a \sin (e+f x)}}\right )}{a (c-d) f}\\ &=-\frac{2 \sqrt{2} \tanh ^{-1}\left (\frac{\sqrt{a} \cos (e+f x)}{\sqrt{2} \sqrt{a+a \sin (e+f x)}}\right )}{a^{3/2} (c-d) f}+\frac{2 \sqrt{c+d} \tanh ^{-1}\left (\frac{\sqrt{a} \sqrt{d} \cos (e+f x)}{\sqrt{c+d} \sqrt{a+a \sin (e+f x)}}\right )}{a^{3/2} (c-d) \sqrt{d} f}\\ \end{align*}
Mathematica [C] time = 2.72914, size = 220, normalized size = 1.79 \[ \frac{(-1)^{3/4} \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )^3 \left (\sqrt [4]{-1} \sqrt{c+d} \left (\log \left (\sec ^2\left (\frac{1}{4} (e+f x)\right ) \left (\sqrt{c+d}-\sqrt{d} \sin \left (\frac{1}{2} (e+f x)\right )+\sqrt{d} \cos \left (\frac{1}{2} (e+f x)\right )\right )\right )-\log \left (\sec ^2\left (\frac{1}{4} (e+f x)\right ) \left (\sqrt{c+d}+\sqrt{d} \sin \left (\frac{1}{2} (e+f x)\right )-\sqrt{d} \cos \left (\frac{1}{2} (e+f x)\right )\right )\right )\right )-(4+4 i) \sqrt{d} \tanh ^{-1}\left (\left (\frac{1}{2}+\frac{i}{2}\right ) (-1)^{3/4} \left (\tan \left (\frac{1}{4} (e+f x)\right )-1\right )\right )\right )}{\sqrt{d} f (d-c) (a (\sin (e+f x)+1))^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 1.283, size = 160, normalized size = 1.3 \begin{align*} -2\,{\frac{ \left ( 1+\sin \left ( fx+e \right ) \right ) \sqrt{-a \left ( -1+\sin \left ( fx+e \right ) \right ) }}{{a}^{3/2} \left ( c-d \right ) \sqrt{a \left ( c+d \right ) d}\cos \left ( fx+e \right ) \sqrt{a+a\sin \left ( fx+e \right ) }f} \left ( \sqrt{2}{\it Artanh} \left ( 1/2\,{\frac{\sqrt{-a \left ( -1+\sin \left ( fx+e \right ) \right ) }\sqrt{2}}{\sqrt{a}}} \right ) \sqrt{a \left ( c+d \right ) d}-{\it Artanh} \left ({\frac{\sqrt{-a \left ( -1+\sin \left ( fx+e \right ) \right ) }d}{\sqrt{a \left ( c+d \right ) d}}} \right ) \sqrt{a}c-{\it Artanh} \left ({\frac{\sqrt{-a \left ( -1+\sin \left ( fx+e \right ) \right ) }d}{\sqrt{a \left ( c+d \right ) d}}} \right ) \sqrt{a}d \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.73173, size = 1661, normalized size = 13.5 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]